package com.hethongviet.job.models;

import java.util.List;

import android.app.Activity;

import com.google.android.maps.GeoPoint;
import com.hethongviet.job.R;

public class Task
{
	private String id = null;
	private String code = null;
	private String name = null;
	private String projectCode = null;
	private String projectId = null;
	private String projectName = null;
	private String worker = null;
	private String dateCreated = null;
	private String dateRequestStart = null;
	private String dateRequestFinish = null;
	private GeoPoint workerGPSGeoPoint = null;
	private String description = null;
	private String imagePath = null;
	private List<String> fileAttachedList = null;
	private String importantLevel = null;
	private String dateActualStart = null;
	private String dateActualFinish = null;
	private String note = null;
	private String status = null;

	/* For Status */
	public static final String STATUS_JUST_CREATE = "JustCreate";
	public static final String STATUS_DELAY_START = "DelayStart";
	public static final String STATUS_DELAY_FINISH = "DelayFinish";
	public static final String STATUS_IN_PROCESS = "InProcess";
	public static final String STATUS_FINISH = "Finish";

	public Task()
	{
	}

	public static final int getStatusColor(Activity activity,
			String statusString)
	{
		if (statusString.equalsIgnoreCase(STATUS_DELAY_FINISH))
		{
			return activity.getResources().getColor(
					R.color.colorTaskDelayFinish);
		}
		else if (statusString.equalsIgnoreCase(STATUS_DELAY_START))
		{
			return activity.getResources().getColor(R.color.colorTaskDelayStart);
		}
		else if (statusString.equalsIgnoreCase(STATUS_FINISH))
		{
			return activity.getResources().getColor(R.color.colorTaskFinish);
		}
		else if (statusString.equalsIgnoreCase(STATUS_IN_PROCESS))
		{
			return activity.getResources().getColor(R.color.colorTaskInProcess);
		}
		return activity.getResources().getColor(R.color.colorTaskJustCreate);
	}

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getWorker()
	{
		return worker;
	}

	public void setWorker(String worker)
	{
		this.worker = worker;
	}

	public String getDateCreated()
	{
		return dateCreated;
	}

	public void setDateCreated(String dateCreated)
	{
		this.dateCreated = dateCreated;
	}

	public String getProjectCode()
	{
		return projectCode;
	}

	public void setProjectCode(String projectCode)
	{
		this.projectCode = projectCode;
	}

	public GeoPoint getWorkerGPSGeoPoint()
	{
		return workerGPSGeoPoint;
	}

	public void setWorkerGPSGeoPoint(GeoPoint workerGPSGeoPoint)
	{
		this.workerGPSGeoPoint = workerGPSGeoPoint;
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	public String getImagePath()
	{
		return imagePath;
	}

	public void setImagePath(String imagePath)
	{
		this.imagePath = imagePath;
	}

	public List<String> getFileAttachedList()
	{
		return fileAttachedList;
	}

	public void setFileAttachedList(List<String> fileAttachedList)
	{
		this.fileAttachedList = fileAttachedList;
	}

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public String getProjectId()
	{
		return projectId;
	}

	public void setProjectId(String projectId)
	{
		this.projectId = projectId;
	}

	public String getProjectName()
	{
		return projectName;
	}

	public void setProjectName(String projectName)
	{
		this.projectName = projectName;
	}

	public String getDateRequestStart()
	{
		return dateRequestStart;
	}

	public void setDateRequestStart(String dateRequestStart)
	{
		this.dateRequestStart = dateRequestStart;
	}

	public String getDateRequestFinish()
	{
		return dateRequestFinish;
	}

	public void setDateRequestFinish(String dateRequestFinish)
	{
		this.dateRequestFinish = dateRequestFinish;
	}

	public String getImportantLevel()
	{
		return importantLevel;
	}

	public void setImportantLevel(String importantLevel)
	{
		this.importantLevel = importantLevel;
	}

	public String getDateActualStart()
	{
		return dateActualStart;
	}

	public void setDateActualStart(String dateActualStart)
	{
		this.dateActualStart = dateActualStart;
	}

	public String getDateActualFinish()
	{
		return dateActualFinish;
	}

	public void setDateActualFinish(String dateActualFinish)
	{
		this.dateActualFinish = dateActualFinish;
	}

	public String getNote()
	{
		return note;
	}

	public void setNote(String note)
	{
		this.note = note;
	}

	public String getStatus()
	{
		return status;
	}

	public void setStatus(String status)
	{
		this.status = status;
	}
}
